package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venueservice.enumeration.HomeBuilderDrawingCategoryAuditDrawingSourceEnum;
import com.eastfair.venueservice.enumeration.HomeBuilderDrawingCategoryAuditAuditStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 主场搭建商图纸分类审核记录
 * </p>
 *
 * @author dqq
 * @since 2023-04-28
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vsm_home_builder_drawing_category_audit")
@ApiModel(value = "HomeBuilderDrawingCategoryAudit", description = "主场搭建商图纸分类审核记录")
@AllArgsConstructor
public class HomeBuilderDrawingCategoryAudit extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 搭建商报馆ID或主场一键报馆ID
     */
    @ApiModelProperty(value = "搭建商报馆ID或主场一键报馆ID")
    @TableField(value = "report_id")
    @Excel(name = "搭建商报馆ID或主场一键报馆ID")
    private Long reportId;

    /**
     * 图纸来源 #{BUILDER_REPORT:搭建商报馆;HOME_REPORT:主场一键报馆}
     */
    @ApiModelProperty(value = "图纸来源 #{BUILDER_REPORT:搭建商报馆;HOME_REPORT:主场一键报馆}")
    @TableField(value = "drawing_source")
    @Excel(name = "图纸来源 #{BUILDER_REPORT:搭建商报馆;HOME_REPORT:主场一键报馆}", replace = {"搭建商报馆_BUILDER_REPORT", "主场一键报馆_HOME_REPORT",  "_null"})
    private HomeBuilderDrawingCategoryAuditDrawingSourceEnum drawingSource;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会ID")
    private Long exhibitionManageId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 100, message = "展会名称长度不能超过100")
    @TableField(value = "exhibition_manage_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionManageName;

    /**
     * 展厅编码
     */
    @ApiModelProperty(value = "展厅编码")
    @Size(max = 100, message = "展厅编码长度不能超过100")
    @TableField(value = "space_code", condition = LIKE)
    @Excel(name = "展厅编码")
    private String spaceCode;

    /**
     * 展厅号
     */
    @ApiModelProperty(value = "展厅号")
    @Size(max = 100, message = "展厅号长度不能超过100")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展厅号")
    private String spaceName;

    /**
     * 展位编码
     */
    @ApiModelProperty(value = "展位编码")
    @Size(max = 64, message = "展位编码长度不能超过64")
    @TableField(value = "site_code", condition = LIKE)
    @Excel(name = "展位编码")
    private String siteCode;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 64, message = "展位号长度不能超过64")
    @TableField(value = "site_name", condition = LIKE)
    @Excel(name = "展位号")
    private String siteName;

    /**
     * 图片分类ID
     */
    @ApiModelProperty(value = "图片分类ID")
    @TableField(value = "drawing_id")
    @Excel(name = "图片分类ID")
    private Long drawingId;

    /**
     * 图片分类名称
     */
    @ApiModelProperty(value = "图片分类名称")
    @Size(max = 100, message = "图片分类名称长度不能超过100")
    @TableField(value = "drawing_name", condition = LIKE)
    @Excel(name = "图片分类名称")
    private String drawingName;

    /**
     * 图纸类型
     */
    @ApiModelProperty(value = "图纸类型")
    @Size(max = 5, message = "图纸类型长度不能超过5")
    @TableField(value = "drawing_type", condition = LIKE)
    @Excel(name = "图纸类型")
    private String drawingType;

    /**
     * 图片分类序号
     */
    @ApiModelProperty(value = "图片分类序号")
    @TableField(value = "drawing_sort")
    @Excel(name = "图片分类序号")
    private Integer drawingSort;

    /**
     * 提交时间
     */
    @ApiModelProperty(value = "提交时间")
    @TableField(value = "report_time")
    @Excel(name = "提交时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime reportTime;

    /**
     * 审核状态 #{HAS_REPORT:未审批;APPROVED:已合格;NOT_APPROVED:不合格;NOT_NEED_AUDIT:无需审核}
     */
    @ApiModelProperty(value = "审核状态 #{HAS_REPORT:未审批;APPROVED:已合格;NOT_APPROVED:不合格;NOT_NEED_AUDIT:无需审核}")
    @TableField(value = "audit_status")
    @Excel(name = "审核状态 #{HAS_REPORT:未审批;APPROVED:已合格;NOT_APPROVED:不合格;NOT_NEED_AUDIT:无需审核}", replace = {"未审批_HAS_REPORT", "已合格_APPROVED", "不合格_NOT_APPROVED", "无需审核_NOT_NEED_AUDIT",  "_null"})
    private HomeBuilderDrawingCategoryAuditAuditStatusEnum auditStatus;

    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    @Size(max = 200, message = "审核意见长度不能超过200")
    @TableField(value = "audit_opinion", condition = LIKE)
    @Excel(name = "审核意见")
    private String auditOpinion;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @Excel(name = "审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;

    /**
     * 审核人id
     */
    @ApiModelProperty(value = "审核人id")
    @TableField(value = "audit_user_id")
    @Excel(name = "审核人id")
    private Long auditUserId;

    /**
     * 审核人姓名
     */
    @ApiModelProperty(value = "审核人姓名")
    @Size(max = 100, message = "审核人姓名长度不能超过100")
    @TableField(value = "audit_user_name", condition = LIKE)
    @Excel(name = "审核人姓名")
    private String auditUserName;

    /**
     * 主场审核状态
     */
    @ApiModelProperty(value = "主场审核状态")
    @Size(max = 64, message = "主场审核状态长度不能超过64")
    @TableField(value = "home_audit_status", condition = LIKE)
    @Excel(name = "主场审核状态")
    private String homeAuditStatus;

    /**
     * 主场审核意见
     */
    @ApiModelProperty(value = "主场审核意见")
    @Size(max = 200, message = "主场审核意见长度不能超过200")
    @TableField(value = "home_audit_opinion", condition = LIKE)
    @Excel(name = "主场审核意见")
    private String homeAuditOpinion;


    @Builder
    public HomeBuilderDrawingCategoryAudit(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long reportId, HomeBuilderDrawingCategoryAuditDrawingSourceEnum drawingSource, Long exhibitionManageId, String exhibitionManageName, String spaceCode, String spaceName, 
                    String siteCode, String siteName, Long drawingId, String drawingName, String drawingType, Integer drawingSort, 
                    LocalDateTime reportTime, HomeBuilderDrawingCategoryAuditAuditStatusEnum auditStatus, String auditOpinion, LocalDateTime auditTime, Long auditUserId, String auditUserName, 
                    String homeAuditStatus, String homeAuditOpinion) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.reportId = reportId;
        this.drawingSource = drawingSource;
        this.exhibitionManageId = exhibitionManageId;
        this.exhibitionManageName = exhibitionManageName;
        this.spaceCode = spaceCode;
        this.spaceName = spaceName;
        this.siteCode = siteCode;
        this.siteName = siteName;
        this.drawingId = drawingId;
        this.drawingName = drawingName;
        this.drawingType = drawingType;
        this.drawingSort = drawingSort;
        this.reportTime = reportTime;
        this.auditStatus = auditStatus;
        this.auditOpinion = auditOpinion;
        this.auditTime = auditTime;
        this.auditUserId = auditUserId;
        this.auditUserName = auditUserName;
        this.homeAuditStatus = homeAuditStatus;
        this.homeAuditOpinion = homeAuditOpinion;
    }

}
